package com.leizi.igym.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.leizi.igym.domain.Category;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: leizi0110
 * @CreateTime: 2024-04-07  14:55
 * @Description:
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "课程分页返回的数据格式")
public class CourseVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1388585273757735878L;
    @Schema(name = "主键值")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(name = "授课教练id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long trainerId;

    @Schema(name = "分类id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;

    @Schema(name = "课程姓名")
    private String courseName;

    @Schema(name = "授课教练姓名")
    private String trainerName;

    @Schema(name = "分类名")
    private String categoryName;

    @Schema(name = "课程封面")
    private String cover;

    @Schema(name = "购买量")
    private int buyCount;

    @Schema(name = "课时数")
    private int lessonNum;

    @Schema(name = "课程状态")
    private int status;

    // 只用于显示
    @Schema(name = "课程价格")
    private String price;

    @Schema(name = "发布时间")
    private LocalDate publishTime;

    @Schema(name = "课程描述")
    private String descrip;

    @Schema(name = "授课教练头像")
    private String avatar;


}
